package com.blacksee.bluetoothpoker.logic;

import java.util.Hashtable;
import java.util.Vector;

import com.blacksee.bluetoothpoker.network.TableBean;

public class MenuInfo {
	private Vector tablesList;
	private Vector tableBeans;
	private boolean isPlayerAccepted;
	private Hashtable playersList;
	private String gameName;  //server creates a new table
	
	public MenuInfo(){
		tablesList = new Vector();
		playersList = new Hashtable();
		tableBeans = new Vector();
	}
	
	public void addTable(String name){
		tablesList.addElement(name);
	}
	
	public void setTables(Vector tables){
		tableBeans = tables;
		for(int i=0; i<tableBeans.size(); i++){
			tablesList.addElement(((TableBean)tableBeans.elementAt(i)).getTableName());
		}
	}
	
	public Vector getTablesList(){
		return tablesList;
	}
	
	
	public Hashtable getPlayersList() {
		return playersList;
	}

	public void setPlayersList(Hashtable playersList) {
		this.playersList = playersList;
	}

	public void addPlayer(int playerId, String playerName){
		this.playersList.put(new Integer(playerId), playerName);
	}
	
	public boolean isPlayerAccepted() {
		return isPlayerAccepted;
	}

	public void setPlayerAccepted(boolean isPlayerAccepted) {
		this.isPlayerAccepted = isPlayerAccepted;
	}

	public String getGameName() {
		return gameName;
	}

	public void setGameName(String gameName) {
		this.gameName = gameName;
	}

	public Vector getTableBeans() {
		return tableBeans;
	}


}
